{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
    <li><a href="javascript:;">佣金明细</a></li>
</ul>
<div class="app-content">
    <div class="app-filter">
		<div class="filter-list">
            <form action="" method="get" class="form-horizontal" role="form" id="form1">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="{MODULE_NAME}" />
                <input type="hidden" name="p" value="sharegift" />
                <input type="hidden" name="ac" value="sharebase" />
                <input type="hidden" name="do" value="sharecurrent" />
                <div class="form-group">
					<label class="col-sm-2 control-label">状态</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo wl_filter_url('type:1');}" class="btn {if intval($_GPC['type']) == 1}btn-primary{else}btn-default{/if}">收入</a>
							<a href="{php echo wl_filter_url('type:2');}" class="btn {if intval($_GPC['type']) == 2}btn-primary{else}btn-default{/if}">支出</a>
						</div>
					</div>
				</div>
                <div class="form-group">
					<label class="col-sm-2 control-label">类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('plugin:0');}" class="btn {if intval($_GPC['plugin']) == 0}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo wl_filter_url('plugin:1');}" class="btn {if intval($_GPC['plugin']) == 1}btn-primary{else}btn-default{/if}">抢购</a>
							<a href="{php echo wl_filter_url('plugin:2');}" class="btn {if intval($_GPC['plugin']) == 2}btn-primary{else}btn-default{/if}">团购</a>
							<a href="{php echo wl_filter_url('plugin:3');}" class="btn {if intval($_GPC['plugin']) == 3}btn-primary{else}btn-default{/if}">掌上信息</a>
						</div>
					</div>
				</div>
				 <div class="form-group">
					<label class="col-sm-2 control-label">时间</label>
					<div class="col-sm-9">
                        {php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));}
					</div>
				</div>
                <div class="form-group form-inline">
					<label class="col-sm-2 control-label">关键字</label>
					<div class="col-sm-9">
						<select name="keywordtype" class="form-control">
							<option value="">关键字类型</option>
							<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>分享人MID</option>
							<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>分享人昵称</option>
							<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>金额大于</option>
                            <option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>金额小于</option>
						</select>
						<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}"  placeholder="请输入关键字"/>
                    </div>
				</div>
                <div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary" id="search">筛选</button>
					</div>
				</div>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        $("#search").click(function(){
            $('#form1')[0].submit();
        });


    </script>
    <div class="app-table-list">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:5%;">MID</th>
                        <th style="width:15%;">分享人姓名</th>
                        <th style="width:10%;">收支</th>
                        <th style="width:10%;">金额</th>
                        <th style="width:15%;">来源</th>
                        <th style="width:20%;">插件</th>
                        <th style="width:25%;">时间</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $details $de}
                    <tr>
                        <td>{$de['mid']}</td>
                        <td>{$de['nickname']}</td>
                        <td>
                            {if $de['type'] == 1}
                        	<span class="label label-success">收入</span>
                        	{else} 
                        	<span class="label label-danger" >支出</span>
                        	{/if}
                        </td>
                        <td style="color: red;">{$de['price']}</td>
                        <td>{$de['buyname']}</td>
                        <td>
                       	  	{if $de['plugin'] == 1}
                        	<span class="label label-success">抢购</span>
                        	{else if $de['plugin'] == 2} 
                        	<span class="label label-warning">团购</span>
                        	{else if $de['plugin'] == 3} 
                        	<span class="label label-primary">掌上信息</span>
                        	{/if}
                        </td>
                        <td>{php echo date('Y-m-d H:i:s',$de['createtime'])}</td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
        </div>
        <div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
    </div>
    <style>
        .change:hover{
            cursor:pointer;
        }
    </style>
</div>
{php include wl_template('common/footer');}